package com.heima.search.repository;

import com.heima.search.entity.ApAssociateWords;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

public interface AssociateWordsRepository extends MongoRepository<ApAssociateWords, String> {

    /*public List<ApAssociateWords> findByAssociateWordsStartingWith(String name);


    List<ApAssociateWords> findTop10ByAssociateWordsStartingWithOrderByCreatedTimeDesc(String name);*/

    public List<ApAssociateWords> findByAssociateWordsStartingWith(String name);

    public List<ApAssociateWords> findTop5ByAssociateWordsStartingWithOrderByCreatedTimeDesc(String name);
}
